home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / HP26.TRM < prev    next >
Text File  |  1992-03-25  |  2KB  |  126 lines

  1. /*
  2.  * $Id: hp26.trm,v 3.26 92/03/24 22:34:55 woo Exp Locker: woo $
  3.  */
  4.  
  5. /* GNUPLOT - hp26.trm */
  6. /*
  7.  * Copyright (C) 1990, 1991, 1992   
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software  is provided "as is" without express or implied warranty.
  20.  * 
  21.  * This file is included by ../term.c.
  22.  *
  23.  * This terminal driver supports:
  24.  *  HP2623A 
  25.  *
  26.  * AUTHORS
  27.  *   hplvlch!ch (Chuck Heller) 
  28.  * 
  29.  * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  30.  * 
  31.  */
  32.  
  33.  
  34. #define HP26_XMAX 512
  35. #define HP26_YMAX 390
  36.  
  37. #define HP26_XLAST (HP26_XMAX - 1)
  38. #define HP26_YLAST (HP26_XMAX - 1)
  39.  
  40. /* Assume a character size of 1, or a 7 x 10 grid. */
  41. #define HP26_VCHAR    10
  42. #define HP26_HCHAR    7
  43. #define HP26_VTIC    (HP26_YMAX/70)        
  44. #define HP26_HTIC    (HP26_XMAX/75)        
  45.  
  46. HP26_init()
  47. {
  48.     /*    The HP2623A needs no initialization. */
  49. }
  50.  
  51.  
  52. HP26_graphics()
  53. {
  54.     /*    Clear and enable the display */
  55.  
  56.     fputs("\033*daZ\033*dcZ",outfile);
  57. }
  58.  
  59.  
  60. HP26_text()
  61. {
  62.     fputs("\033*dT",outfile);    /* back to text mode */
  63. }
  64.  
  65.  
  66. HP26_linetype(linetype)
  67. int linetype;
  68. {
  69. #define    SOLID    1
  70. #define LINE4    4
  71. #define LINE5    5
  72. #define LINE6    6
  73. #define LINE8    8
  74. #define    DOTS    7
  75. #define LINE9    9
  76. #define LINE10    10
  77.  
  78. static int map[2+9] = {    SOLID,    /* border */
  79.                         SOLID,    /* axes */
  80.                         DOTS,    /* plot 0 */
  81.                         LINE4,    /* plot 1 */
  82.                         LINE5,    /* plot 2 */
  83.                         LINE6,    /* plot 3 */
  84.                         LINE8,    /* plot 4 */
  85.                         LINE9,    /* plot 5 */
  86.                         LINE10,    /* plot 6 */
  87.                         SOLID,    /* plot 7 */
  88.                         SOLID    /* plot 8 */ };
  89.  
  90.     if (linetype >= 9)
  91.         linetype %= 9;
  92.     fprintf(outfile,"\033*m%dB",map[linetype + 2]);
  93. }
  94.  
  95.  
  96. HP26_move(x,y)
  97. int x,y;
  98. {
  99.     fprintf(outfile,"\033*pa%d,%dZ",x,y);
  100. }
  101.  
  102.  
  103. HP26_vector(x,y)
  104. int x,y;
  105. {
  106.     fprintf(outfile,"\033*pb%d,%dZ",x,y);
  107. }
  108.  
  109.  
  110. HP26_put_text(x,y,str)
  111. int x, y;
  112. char *str;
  113. {
  114.     HP26_move(x,y + HP26_VCHAR/2);
  115.     fputs("\033*dS",outfile);
  116.     fprintf(outfile,"\033*m3Q\033*l%s\n",str);
  117.     fputs("\033*dT",outfile);
  118. }
  119.  
  120.  
  121.  
  122. HP26_reset()
  123. {
  124. }
  125.  
  126.